<template>
	<div>
		<van-cell-group>
			<van-field
					:value="username"
					label="用户名"
					left-icon="contact"
					disabled></van-field>
		</van-cell-group>
		<van-button type="danger" @click="logout" block>退出</van-button>
	</div>
</template>

<script>
	import { storage } from "@/libs/utils";
	import { Search, List, CellGroup, Cell, Field, Button, Toast, Dialog } from "vant";
	Vue.use(CellGroup).use(Cell).use(Field).use(Button);

	window.tab3Vue = {
		name: "tab2",
		components: { Search, List, Cell, Toast, Dialog },
		data() {
			return {
				username: '',
			};
		},
		methods: {
			logout() {
				this.$ac.sendEvent({
					name: 'logout'
				});
			}
		},
		mounted() {
			this.username = storage.get('username');
		},
		created() {
		}
	};

	export default window.tab3Vue;
</script>

<style scoped>
</style>
